package com.financing.platform.dto;

import java.util.Date;
import java.util.List;

import com.financing.platform.common.CsvExportable;
import com.financing.platform.util.DateUtil;
import com.financing.platform.util.StringUtil;
import com.financing.platform.vo.FaUserVisitStatisticVO;
import com.financing.platform.vo.ManagerLicaishiVO;




/**
 * @author Mars
 * @createDate 2014年7月10日
 */
public class FaUserDTO extends BaseDTO implements CsvExportable{

	private static final long serialVersionUID = 5498322570316933915L;
	
	private FaUserAuthDTO faUserauth;//认证信息
	
	private ManagerLicaishiVO licaishiVO;//分配信息
	
	private FaUserVisitStatisticVO visitStatisticVO;//回访统计信息
	
	
	
	public FaUserVisitStatisticVO getVisitStatisticVO() {
		return visitStatisticVO;
	}

	public void setVisitStatisticVO(FaUserVisitStatisticVO visitStatisticVO) {
		this.visitStatisticVO = visitStatisticVO;
	}

	public ManagerLicaishiVO getLicaishiVO() {
		return licaishiVO;
	}

	public void setLicaishiVO(ManagerLicaishiVO licaishiVO) {
		this.licaishiVO = licaishiVO;
	}

	public FaUserAuthDTO getFaUserauth() {
		return faUserauth;
	}

	public void setFaUserauth(FaUserAuthDTO faUserauth) {
		this.faUserauth = faUserauth;
	}

	/**
	 * 用户ID
	 */
	private String id;
	/**
	 * 用户名称
	 */
	private String uName;
	/**
	 * 真实姓名
	 */
	private String uRealName;
	/**
	 * 登录名
	 */
	private String uLoginName;
	/**
	 * 密码
	 */
	private String uPassWord;
	/**
	 * 证件类型:1:身份证，2：护照,3:驾照
	 */
	private int uNumberType;
	/**
	 * 证件号：身份证号码/护照号/驾照
	 */
	private String uNumber;
	/**
	 * 角色：资深FA、初级FA等
	 */
	private String uRole;
	/**
	 * 电话号码
	 */
	private String uTelephone;
	/**
	 * 移动电话
	 */
	private String uMobile;
	/**
	 * FA业务编码
	 */
	private String uCode;
	/**
	 * 电子邮件
	 */
	private String uEmail;
	/**
	 *1：男，2：女，3：隐私
	 */
	private int uSex;
	/**
	 * 年龄
	 */
	private int uAge;
	/**
	 * 地址
	 */
	private String uAddress;

	/**
	 * 自我介绍
	 */
	private String uRemark;
	
	/**
	 * 所在公司，1自由，2诺亚
	 */
	private String uCompany;
	
	/**
	 * 用户图片地址
	 */
	private String uImage;
	
	/**
	 * 用户状态
	 */
	private String status;
	
	/**
	 * 审核意见
	 */
	private String uAuditOpinion;
	
	/**
	 * 用户来源
	 */
	private String sourceCode;
	
	
	/**
	 * 用户是否有效 广告用
	 */
	private String isValid;
	
	/**
	 * 用户备注
	 */
	private String remark;
	
	/**
	 * 媒体来源
	 */
	private String mediaSource;
	/**
	 * 名片地址
	 */
	private String uCardAddress;
	
	/**
	 * 活动来源
	 */
	private String actSource;
	/**
	 * 是否已经回访 true:已经回访  false:未回访
	 */
	private boolean visitFlag;
	
	/**
	 * 用户来源（登录名）
	 */
	private String sourceLoginName;
	
	/**
	 * 用户来源（昵称）
	 */
	private String sourceName;
	
	/**
	 * 账户类型：0：自由，1：机构用户，3：机构fa
	 */
	private String uType;
	
	
	/**
	 * 审核备注
	 */
	private String auditRemarks;
	
	/**
	 * 微信标识 （0 关联 1 未关联）
	 */
	private String wechatFlag;
	
	/**
	 * 注册时间 （开始）
	 */
	private String createDateStart;
	
	/**
	 * 注册时间 （结束）
	 */
	private String createDateEnd;

	private String disDateStart;//分配时间
	private String disDateEnd;
	
	/**
	 * 公司名称
	 */
	private String uCompanyName;
	
	/**
	 * 公司地址
	 */
	private String uCompanyADD;
	
	/**
	 * 职位
	 */
	private String uJob;
	
	/**
	 * 认证数
	 */
	private String authPassCount;
	
	/**
	 * 认证时间
	 */
	private Date authDate;
	
	/**
	 * 认证来源
	 */
	private String authSource;
	
	private String authById;//审核人Id
	
	private String authByName;//审核人名称
	
	private Integer loginNum;//登录次数
	
	/**
	 * 最后登录时间
	 */
	private Date lastLoginTime;
	
	/**
	 * 最后登录IP
	 */
	private String lastLoginIp;
	
	/**
	 * 成交标识 （0 已成交 1 未成交）
	 */
	private String orderFlag;
	
	/**
	 * 系统管理员id
	 */
	private String systemUserId;
	
	/**
	 * 系统管理员id s
	 */
	private List<String> systemUserIds;
	
	/**
	 * 查询时，是否选择查询没有订单管理员
	 */
	private String isnoManagerUserLicaishi;
	
	/**
	 * 理财师管理名字
	 */
	private String licaishiManagerUser;
	
	/**
	 *是否查询待回访 
	*/
	 private String notHasVisit;
	 /**
	  * 是否待审核
	*/
	 private String notHasCheck;

	public String getuMobileAdd() {
		return uMobileAdd;
	}

	public void setuMobileAdd(String uMobileAdd) {
		this.uMobileAdd = uMobileAdd;
	}

	/**
	 * 手机号归属地
	 */
	private String uMobileAdd;
	 
	 /**
	  * 机构用户id
	  */
	 private String uManagerId;
	 
	 private String visitModel;//跟踪周期    1为 7-14天未跟踪     2为14-30天未跟踪   3为30到60
	 
	 private String customerHeat;
	 
	 private String customerCategory;// 客户分类（1：潜在客户，2：普通客户，3：合作伙伴，4：重要客户，5：失效客户）
	 
	 private String orderBy;// 排序依据（倒序）
	 
	 private String wechatNo;//微信号
	 
	 private String orderByTag; // desc asc
	 
	 private String addAuthDate;//提交审核的时间
	 
	 private String isRegister;//是否注册：0未注册，1已注册
	 private String isCompany;// 是否公司渠道:0否，1是
	 
	 private String uFrom;//理财师来源 0或空：代表来自超级理财师 1：代表来自理财师店铺
	 private String uCardType;//理财师认证类型
	 
	 private String uShopRole;//理财师工具用户认证 1：未提交资料 2：认证通过 98：审核中，99：审核失败

	 private String uSystemRate;//系统标识

	private String licaishiIds;//licaishis
	
	private String faRevisitType;//是否有待办1有待办2无待办

	private String frontLicaishiManagerUser;//前理财顾问
	 
	public String getuShopRole() {
		return uShopRole;
	}

	public void setuShopRole(String uShopRole) {
		this.uShopRole = uShopRole;
	}

	public String getuCardType() {
		return uCardType;
	}

	public void setuCardType(String uCardType) {
		this.uCardType = uCardType;
	}

	public String getuFrom() {
		return uFrom;
	}

	public void setuFrom(String uFrom) {
		this.uFrom = uFrom;
	}

	public String getCustomerCategory() {
		return customerCategory;
	}

	public void setCustomerCategory(String customerCategory) {
		this.customerCategory = customerCategory;
	}

	public String getCustomerHeat() {
		return customerHeat;
	}

	public void setCustomerHeat(String customerHeat) {
		this.customerHeat = customerHeat;
	}

	public String getVisitModel() {
		return visitModel;
	}

	public void setVisitModel(String visitModel) {
		this.visitModel = visitModel;
	}

	public String getuManagerId() {
		return uManagerId;
	}

	public void setuManagerId(String uManagerId) {
		this.uManagerId = uManagerId;
	}

	public String getNotHasCheck() {
		return notHasCheck;
	}

	public void setNotHasCheck(String notHasCheck) {
		this.notHasCheck = notHasCheck;
	}

	public FaUserDTO() { 
		super();
	}

	public String getuImage() {
		return uImage;
	}

	public void setuImage(String uImage) {
		this.uImage = uImage;
	}

	public String getuName() {
		return uName;
	}


	public void setuName(String uName) {
		this.uName = uName;
	}


	public String getuLoginName() {
		return uLoginName;
	}


	public void setuLoginName(String uLoginName) {
		this.uLoginName = uLoginName;
	}


	public String getuPassWord() {
		return uPassWord;
	}


	public void setuPassWord(String uPassWord) {
		this.uPassWord = uPassWord;
	}


	public int getuNumberType() {
		return uNumberType;
	}


	public void setuNumberType(int uNumberType) {
		this.uNumberType = uNumberType;
	}


	public String getuNumber() {
		return uNumber;
	}


	public void setuNumber(String uNumber) {
		this.uNumber = uNumber;
	}


	public String getuRole() {
		return uRole;
	}


	public void setuRole(String uRole) {
		this.uRole = uRole;
	}


	public String getuTelephone() {
		return uTelephone;
	}


	public void setuTelephone(String uTelephone) {
		this.uTelephone = uTelephone;
	}


	public String getuMobile() {
		return uMobile;
	}


	public void setuMobile(String uMobile) {
		this.uMobile = uMobile;
	}


	public String getuCode() {
		return uCode;
	}


	public void setuCode(String uCode) {
		this.uCode = uCode;
	}


	public String getuEmail() {
		return uEmail;
	}


	public void setuEmail(String uEmail) {
		this.uEmail = uEmail;
	}


	public int getuSex() {
		return uSex;
	}


	public void setuSex(int uSex) {
		this.uSex = uSex;
	}


	public int getuAge() {
		return uAge;
	}


	public void setuAge(int uAge) {
		this.uAge = uAge;
	}


	public String getuAddress() {
		return uAddress;
	}


	public void setuAddress(String uAddress) {
		this.uAddress = uAddress;
	}


	public String getuRemark() {
		return uRemark;
	}


	public void setuRemark(String uRemark) {
		this.uRemark = uRemark;
	}


	public String getuCompany() {
		return uCompany;
	}


	public void setuCompany(String uCompany) {
		this.uCompany = uCompany;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getuAuditOpinion() {
		return uAuditOpinion;
	}

	public void setuAuditOpinion(String uAuditOpinion) {
		this.uAuditOpinion = uAuditOpinion;
	}

	public String getSourceCode() {
		return sourceCode;
	}

	public void setSourceCode(String sourceCode) {
		this.sourceCode = sourceCode;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getIsValid() {
		return isValid;
	}

	public void setIsValid(String isValid) {
		this.isValid = isValid;
	}

	public boolean isVisitFlag() {
		return visitFlag;
	}

	public void setVisitFlag(boolean visitFlag) {
		this.visitFlag = visitFlag;
	}

	public String getMediaSource() {
		return mediaSource;
	}

	public void setMediaSource(String mediaSource) {
		this.mediaSource = mediaSource;
	}

	public String getuRealName() {
		return uRealName;
	}

	public void setuRealName(String uRealName) {
		this.uRealName = uRealName;
	}

	public String getActSource() {
		return actSource;
	}

	public void setActSource(String actSource) {
		this.actSource = actSource;
	}

	public String getSourceName() {
		return sourceName;
	}

	public void setSourceName(String sourceName) {
		this.sourceName = sourceName;
	}

	public String getSourceLoginName() {
		return sourceLoginName;
	}

	public void setSourceLoginName(String sourceLoginName) {
		this.sourceLoginName = sourceLoginName;
	}

	public String getuCardAddress() {
		return uCardAddress;
	}

	public void setuCardAddress(String uCardAddress) {
		this.uCardAddress = uCardAddress;
	}

	public String getAuditRemarks() {
		return auditRemarks;
	}

	public void setAuditRemarks(String auditRemarks) {
		this.auditRemarks = auditRemarks;
	}

	public String getWechatFlag() {
		return wechatFlag;
	}

	public void setWechatFlag(String wechatFlag) {
		this.wechatFlag = wechatFlag;
	}

	public String getCreateDateStart() {
		return createDateStart;
	}

	public void setCreateDateStart(String createDateStart) {
		this.createDateStart = createDateStart;
	}

	public String getCreateDateEnd() {
		return createDateEnd;
	}

	public void setCreateDateEnd(String createDateEnd) {
		this.createDateEnd = createDateEnd;
	}

	public String getuCompanyName() {
		return uCompanyName;
	}

	public void setuCompanyName(String uCompanyName) {
		this.uCompanyName = uCompanyName;
	}

	public String getuCompanyADD() {
		return uCompanyADD;
	}

	public void setuCompanyADD(String uCompanyADD) {
		this.uCompanyADD = uCompanyADD;
	}

	public String getuJob() {
		return uJob;
	}

	public void setuJob(String uJob) {
		this.uJob = uJob;
	}

	public String getAuthPassCount() {
		return authPassCount;
	}

	public void setAuthPassCount(String authPassCount) {
		this.authPassCount = authPassCount;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLoginIp() {
		return lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	@Override
	public String csvTitle() {
		return "登录名,昵称,真实姓名,邀请人,活动来源,媒体来源,注册时间,地址,公司,职位,关联微信,状态 ";
	}

	@Override
	public String toCsvString() {
		StringBuilder builder = new StringBuilder();
		builder.append(getuLoginName()).append(",")
		.append(checkString(getuName())).append(",")
		.append(checkString(getuRealName())).append(",")
		.append(checkString(getSourceLoginName())).append(",")
		.append(getActSourceForString(getActSource())).append(",")
		.append(getMediaSourceForString(getMediaSource())).append(",")
		.append(DateUtil.getString(getCreateDate(), DateUtil.DEFAULT_DATE_FORMAT)).append(",")
		.append(checkString(getuCompanyADD())).append(",")
		.append(checkString(getuCompanyName())).append(",")
		.append(checkString(getuJob())).append(",")
		.append(getWechatFlagForString(getWechatFlag())).append(",")
		.append(getuRoleForString(getuRole())).append(",");
		return builder.toString();
	}
	/**
	 * 活动来源
	 * @param status
	 * @return
	 */
	public  String getActSourceForString(String status){
		if("ZCSHB".equals(status)){
			return "注册送红包";
		}else if("FXSHB".equals(status)){
			return "分享送红包";
		}else if("ZCSHB88".equals(status)){
			return "注册送红包88";
		}else if("DCWJ".equals(status)){
			return "调查问卷";
		}else if("SBD300".equals(status)){
			return "斯巴达300";
		}
		return "";
	}
	
	/**
	 * 状态
	 * @param status
	 * @return
	 */
	public  String getuRoleForString(String status){
		if("2".equals(status)){
			return "个人";
		}else if("3".equals(status)){
			return "个人理财用户";
		}else if("4".equals(status)){
			return "银行从业者";
		}else if("5".equals(status)){
			return "券商和基金从业者";
		}else if("6".equals(status)){
			return "第三方从业者";
		}else if("7".equals(status)){
			return "信托公司和资管公司从业者";
		}else if("8".equals(status)){
			return "房地产经纪人";
		}else if("9".equals(status)){
			return "保险从业人员";
		}else if("1".equals(status)){
			return "未提交认证";
		}else if("98".equals(status)){
			return "认证审核中";
		}else if("99".equals(status)){
			return "认证失败";
		}
		return "";
	}
	/**
	 * 媒体来源
	 * @param status
	 * @return
	 */
	public  String getMediaSourceForString(String status){
		if("PT".equals(status)){
			return "平台";
		}else if("YQF".equals(status)){
			return "亿启发";
		}
		return "";
	}
	/**
	 * 媒体来源
	 * @param status
	 * @return
	 */
	public  String checkString(String status){
		if(StringUtil.isNullOrEmptyStr(status)){
			return "";
		}else{
			return status.replaceAll(",", "，");
		}	
	}
	/**
	 * 关联微信
	 * @param status
	 * @return
	 */
	public  String getWechatFlagForString(String status){
		if("1".equals(status)){
			return "是";
		}
		return "否";
	}

	public Date getAuthDate() {
		return authDate;
	}

	public void setAuthDate(Date authDate) {
		this.authDate = authDate;
	}

	public String getOrderFlag() {
		return orderFlag;
	}

	public void setOrderFlag(String orderFlag) {
		this.orderFlag = orderFlag;
	}

	public String getuType() {
		return uType;
	}

	public void setuType(String uType) {
		this.uType = uType;
	}

	public String getAuthById() {
		return authById;
	}

	public void setAuthById(String authById) {
		this.authById = authById;
	}

	public String getAuthByName() {
		return authByName;
	}

	public void setAuthByName(String authByName) {
		this.authByName = authByName;
	}

	public Integer getLoginNum() {
		return loginNum;
	}

	public void setLoginNum(Integer loginNum) {
		this.loginNum = loginNum;
	}

	public String getSystemUserId() {
		return systemUserId;
	}

	public void setSystemUserId(String systemUserId) {
		this.systemUserId = systemUserId;
	}
	
	public String getIsnoManagerUserLicaishi() {
		return isnoManagerUserLicaishi;
	}

	public void setIsnoManagerUserLicaishi(String isnoManagerUserLicaishi) {
		this.isnoManagerUserLicaishi = isnoManagerUserLicaishi;
	}

	public String getLicaishiManagerUser() {
		return licaishiManagerUser;
	}

	public void setLicaishiManagerUser(String licaishiManagerUser) {
		this.licaishiManagerUser = licaishiManagerUser;
	}

	public String getNotHasVisit() {
		return notHasVisit;
	}

	public void setNotHasVisit(String notHasVisit) {
		this.notHasVisit = notHasVisit;
	}

	public String getAuthSource() {
		return authSource;
	}

	public void setAuthSource(String authSource) {
		this.authSource = authSource;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}

	public String getWechatNo() {
		return wechatNo;
	}

	public void setWechatNo(String wechatNo) {
		this.wechatNo = wechatNo;
	}

	public String getOrderByTag() {
		return orderByTag;
	}

	public void setOrderByTag(String orderByTag) {
		this.orderByTag = orderByTag;
	}

	public String getAddAuthDate() {
		return addAuthDate;
	}

	public void setAddAuthDate(String addAuthDate) {
		this.addAuthDate = addAuthDate;
	}

	public List<String> getSystemUserIds() {
		return systemUserIds;
	}

	public void setSystemUserIds(List<String> systemUserIds) {
		this.systemUserIds = systemUserIds;
	}

	public String getIsRegister() {
		return isRegister;
	}

	public void setIsRegister(String isRegister) {
		this.isRegister = isRegister;
	}

	public String getIsCompany() {
		return isCompany;
	}

	public void setIsCompany(String isCompany) {
		this.isCompany = isCompany;
	}

	public String getDisDateStart() {
		return disDateStart;
	}

	public void setDisDateStart(String disDateStart) {
		this.disDateStart = disDateStart;
	}

	public String getDisDateEnd() {
		return disDateEnd;
	}

	public void setDisDateEnd(String disDateEnd) {
		this.disDateEnd = disDateEnd;
	}

	public String getuSystemRate() {
		return uSystemRate;
	}

	public void setuSystemRate(String uSystemRate) {
		this.uSystemRate = uSystemRate;
	}

	public String getLicaishiIds() {
		return licaishiIds;
	}

	public void setLicaishiIds(String licaishiIds) {
		this.licaishiIds = licaishiIds;
	}

	public String getFaRevisitType() {
		return faRevisitType;
	}

	public void setFaRevisitType(String faRevisitType) {
		this.faRevisitType = faRevisitType;
	}

	public String getFrontLicaishiManagerUser() {
		return frontLicaishiManagerUser;
	}

	public void setFrontLicaishiManagerUser(String frontLicaishiManagerUser) {
		this.frontLicaishiManagerUser = frontLicaishiManagerUser;
	}
}
